package com.xxg.renrensearch.dao;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.List;


/**
 * 商品SKU信息
 *
 * @author xuxiaogang
 * @date 2021-11-26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "product")
public class Product {
    @Id
    private String id;
    /**
     * spuID
     */
    private Integer spuId;
    /**
     * skuId
     */
    private Integer skuId;
    /**
     * 店铺ID
     */
    private Integer shopId;
    /**
     * 店铺名称
     */
    private String shopName;
    /**
     * spu名称
     */
    private String spuName;
    /**
     * sku名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String skuName;
    /**
     * spu副标题
     */
    private String spuSubTitle;
    /**
     * spu简称
     */
    private String spuShortTitle;
    /**
     * spu类型
     */
    private Integer type;
    /**
     * spu主图
     */
    private String spuThumb;
    /**
     * spu轮播图
     */
    private String spuThumbAll;
    /**
     * spu视频
     */
    private String video;
    /**
     * spu抡博视频
     */
    private String videoThumb;
    /**
     * spu视频类型
     */
    private Integer videoType;
    /**
     * spu库存
     */
    private Integer spuStock;
    /**
     * spu销量
     */
    private Integer sales;
    /**
     * spu真实销量
     */
    private Integer realSales;
    /**
     * spu内容
     */
    private String content;
    /**
     * 推荐标签
     */
    private Boolean isRecommand;
    /**
     * 热销标签
     */
    private Boolean isHot;
    /**
     * 热卖标签
     */
    private Boolean isNew;
    /**
     * sku零售价格
     */
    private BigDecimal skuPrice;
    /**
     * spu最低零售价格
     */
    private BigDecimal spuMinPrice;
    /**
     * spu最高零售价格
     */
    private BigDecimal spuMaxPrice;
    /**
     * spu最低成本价格
     */
    private BigDecimal spuMinCostPrice;
    /**
     * spu最高成本价格
     */
    private BigDecimal spuMaxCostPrice;
    /**
     * sku成本价格
     */
    private BigDecimal skuCostPrice;
    /**
     * sku划线价格
     */
    private BigDecimal skuOriginalPrice;
    /**
     * sku的销量
     */
    private Integer skuSales;
    /**
     * sku主图
     */
    private String skuThumb;
    /**
     * 分类
     */
    private List<Integer> categories;
    /**
     * sku库存
     */
    private Integer skuStock;
}
